<%-- 
    Document   : registration2
    Created on : Sep 29, 2013, 3:13:42 PM
    Author     : HanhHanh
--%>

<%@page import="org.apt.matrimony.beans.LikingCateBeans"%>
<%@page import="org.apt.matrimony.beans.LikingModelBeans"%>
<%@page import="org.apt.matrimony.db.ConvertDateTime"%>
<%@page import="org.apt.matrimony.beans.AccountDetailBeans"%>
<%@page import="org.apt.matrimony.beans.LikingModelBean"%>
<%@page import="org.apt.matrimony.methods.selects"%>
<%@page import="java.util.ArrayList"%>
<%@page import="org.apt.matrimony.beans.AccountBasicBean"%>
<%@page import="org.apt.matrimony.beans.CasteBeans"%>
<%@page import="org.apt.matrimony.beans.ProfessionalBeans"%>
<%@page import="org.apt.matrimony.beans.CityBeans"%>
<%@page import="org.apt.matrimony.beans.MotherTongueBeans"%>
<%@page import="org.apt.matrimony.beans.ReligionBeans"%>
<%@page import="java.util.List"%>
<%@page import="org.apt.matrimony.beans.CountryBeans"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <!-- Mirrored from www.maxwebdesign.asia/demo/numinousmatch/registration1.php by HTTrack Website Copier/3.x [XR&CO'2010], Fri, 20 Sep 2013 17:07:49 GMT -->
    <head>
        <link href="css/template.css" rel="stylesheet" type="text/css" media="all" />
        <!-- JS FOR SuperFish DropDown Menu ############################# -->
        <link href="css/dropDownMenu/superfish.css" rel="stylesheet" type="text/css" media="all" />
        <script type="text/javascript" src="scripts/jquery1.6.2_production.js"></script>

        <link href="css/regis_mem_home.css" rel="stylesheet" type="text/css" />

        <!-- START CHAT FILES -->
        <link type="text/css" rel="stylesheet" media="all" href="chat/css/chat.css" />
        <link type="text/css" rel="stylesheet" media="all" href="chat/css/screen.css" />
        <script type="text/javascript" src="chat/js/jquery.js"></script>
        <script type="text/javascript" src="chat/js/chat.js"></script>
        <!-- END CHAT FILES -->
        <script type="text/javascript" src="scripts/superfish.js"></script>
        <script type="text/javascript" src="js/ValidateLive.js"></script>
        <script type="text/javascript" src="js/fancyzoom.min.js"></script>
        <script language="javascript">
            /*SCRIPT INITIALIZATION FOR DROPDOWN MENU###################### */
            $(document).ready(function(){
                $("ul.sf-menu").superfish();
                $('div.photo a').fancyZoom({scaleImg: true, closeOnClick: true});

                $('#medium_box_link').fancyZoom({width:400, height:300});

                $('#large_box_link').fancyZoom();

                $('#flash_box_link').fancyZoom();
            });

        </script>
        <script language="javascript" src="js/hide.js"></script>
        <link href="css/contact.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript">
            function initShowHideDivs()
            {     // Hidden value
                var divs = document.getElementsByTagName('DIV');
                var divCounter = 1;
                for(var no=0;no<divs.length;no++){
                    if(divs[no].className=='dhtmlgoodies_question'){
                        divs[no].onclick = showHideContent;
                        divs[no].id = 'dhtmlgoodies_q'+divCounter;
                        var answer = divs[no].nextSibling;
                        while(answer && answer.tagName!='DIV'){
                            answer = answer.nextSibling;
                        }
                        answer.id = 'dhtmlgoodies_a'+divCounter;
                        contentDiv = answer.getElementsByTagName('DIV')[0];
                        contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px';
                        contentDiv.className='dhtmlgoodies_answer_content';
                        contentDiv.id = 'dhtmlgoodies_ac' + divCounter;
                        answer.style.display='none';
                        answer.style.height='1px';
                        divCounter++;
                    }
                }
            }
        </script>
        <script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
        <script type="text/javascript" src="js/ajax.js"></script>

        <script type="text/javascript" src="js/ajax-tooltip.js">
        </script>
        <link rel="stylesheet" href="css/ajax-tooltip.css" media="screen" type="text/css"/>
        <link rel="stylesheet" href="css/ajax-tooltip-demo.css" media="screen" type="text/css"/>
        <link rel="stylesheet" href="css/bubble-tooltip.html" media="screen"/>
        <link rel="stylesheet" href="css/Default1.css" type="text/css"/>
        <script src="js/login.js" language="javascript"></script>
        <script language="javascript" src="js/timepicker.js"></script>
        <script language="javascript" src="js/advanced_search_locations.js" type="text/javascript"> </script>
        <!--<script language="javascript" src="js/relcaste.js"></script>-->
    </head>
    <body>
        <div id="wrapper">
            <!-- HEADER STARTS HERE ###################################################  -->
            <jsp:include page="header.jsp"></jsp:include>
            <!-- HEADER ENDS HERE ###################################################  -->
            <!-- CONTENT AREA STARTS HERE ###################################################  -->
            <!-- BREADCRUMBS STARTS HERE #####################################  -->
            <div id="breadcrumb">
                <ul class="breadcrumbs">
                    <li class="left"></li>
                    <li class="center">
                        <div id="breadcrumb_text">You are Here: <span class="pathway">  <a href="index.jsp">Home</a> <img alt="" src="images/icons/arrow_breadcrumbs.png"/>Register</span> </div>
                    </li>
                    <li class="right"></li>
                </ul>
            </div>
            <!-- BREADCRUMBS ENDS HERE ########################################  -->
            <div id="content_area">
                <div id="inner_left">
                    <div id="inner_left_header"></div>

                    <div id="inner_left_content">

                        <jsp:useBean id="list" scope="session" class="org.apt.hanhhanh.matrimony.methods.selects"></jsp:useBean>
                        <!--Left Banner Area1 starts here-->
                        <div class="innerleft_banner"><a href="#"><img src="images/innerleft_banner.jpg" width="228" height="399" alt="advertisement" /></a></div>

                        <!--Left Banner Area1 ends here-->
                        <!-- Success Stories Starts HERE #####################  -->
                        <jsp:include page="storytemplate.jsp"></jsp:include>
                        <!-- Success Stories Ends HERE #######################  -->

                        <!--Left Banner Area1 starts here-->
                        <!--Left Banner Area1 ends here-->

                    </div>

                    <div id="inner_left_footer"></div>
                </div>
                <div id="inner_right">
                    <!-- BUSINESS PAGE CONTENT STARTS HERE ############################################ -->
                    <a name="top" id="top"></a>
                    <div class="profile_block">
                        <div class="header">
                            <h2 class="float_left title"> <span class="black" style="color:#333;">Find your suitable life partner - </span>Account Detail</h2>
                        </div>
                        <div class="body">
                            <!--// -->
                            <form  method="post" name="MatriForm" id="MatriForm" onSubmit="return Validate()" >
                                <table width="100%" border="0" cellpadding="5" cellspacing="5" class="tbl_profiledetails">
                                    <tbody>
                                        <tr>

                                            <td colspan="3" align="left" ><div align="left">
                                                    <h3 class="hline3"><strong><br />
                                                            Account Information </strong></h3>
                                                </div>
                                                <div align="left"></div></td>
                                        </tr>

                                        <div id="bubble_tooltip">
                                            <div class="bubble_top"><span></span></div>
                                            <div class="bubble_middle"><span id="bubble_tooltip_content">Content is loading.</span></div>
                                            <div class="bubble_bottom"></div>
                                        </div>
                                        <%
                                            String username = request.getParameter("username");
                                            username = "Yoko";
                                            List<AccountBasicBean> lst = list.selectAccountBasicByUsername(username);

                                            for (int i = 0; i < lst.size(); i++) {
                                        %>
                                        <tr class="hline2">
                                            <td ><div align="left">Username </div></td>
                                            <td colspan="2" ><div align="left" style="width: 120px">
                                                    <input disabled="true" name="txtUsername" type="text"  value="<%=lst.get(i).getUser_Name()%>" class="textbox1"  id="txtName" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                                </div></td>
                                        </tr>
                                        <tr class="hline2">
                                            <td ><div align="left">Gender </div></td>
                                            <td colspan="2" ><div align="left" style="width: 120px">
                                                    <input disabled="true" name="txtGender" type="text"  value="<%=lst.get(i).getGender()%>" class="textbox1"  id="txtName" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                                </div></td>
                                        </tr>
                                        <tr class="hline2">
                                            <td ><div align="left">  Email </div></td>
                                            <td colspan="2" ><div align="left" style="width: 120px">
                                                    <input  disabled="true"  name="EMAIL" value="<%=lst.get(i).getUser_Email()%>" id="EMAIL" size="40" maxlength="40"  type="text" class="textbox1" style="width:219px;"  onkeydown="showToolTip(event,this.value,0);return true"  onkeyup="showToolTip(event,this.value,0);return true" onkeypress="showToolTip(event,this.value,0);return true" onclick="showToolTip(event,this.value,0);return true" onmouseout="hideToolTip()" onblur="hideToolTip()"/>
                                                    <span id="msg" > </span>
                                                </div></td>
                                        </tr>
                                        <tr class="hline2">
                                            <td ><div align="left">  Date Registed </div></td>
                                            <td colspan="2" ><div align="left" style="width: 120px">
                                                    <input  disabled="true"  name="Date_Registed" value="<%=lst.get(i).getDate_register()%>" id="Date_Registed" size="40" maxlength="40"  type="text" class="textbox1" style="width:219px;"  onkeydown="showToolTip(event,this.value,0);return true"  onkeyup="showToolTip(event,this.value,0);return true" onkeypress="showToolTip(event,this.value,0);return true" onclick="showToolTip(event,this.value,0);return true" onmouseout="hideToolTip()" onblur="hideToolTip()"/>
                                                    <span id="msg" > </span>
                                                </div></td>
                                        </tr> <tr class="hline2">
                                            <td ><div align="left">  Date Expired </div></td>
                                            <td colspan="2" ><div align="left" style="width: 120px">
                                                    <input  disabled="true"  name="Date_Expired" value="<%=lst.get(i).getDate_Exprired()%>" id="Date_Expired" size="40" maxlength="40"  type="text" class="textbox1" style="width:219px;"  onkeydown="showToolTip(event,this.value,0);return true"  onkeyup="showToolTip(event,this.value,0);return true" onkeypress="showToolTip(event,this.value,0);return true" onclick="showToolTip(event,this.value,0);return true" onmouseout="hideToolTip()" onblur="hideToolTip()"/>
                                                    <span id="msg" > </span>
                                                </div></td>
                                        </tr>
                                        <%}%>

                                        <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
                                        <tr>
                                            <td colspan="3">
                                                <a href="changePassword.jsp?username=<%=username%>"> <strong>Change Password</strong></a>&nbsp;&nbsp;&nbsp;
                                                <a href="#"> <strong>Change Avatar</strong></a>&nbsp;&nbsp;&nbsp;
                                                <a href="changeDateExpired.jsp?username=<%=username%>"> <strong>Change Expired Date</strong></a>
                                            </td>

                                        </tr>
                                        <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
                                        </form>
                                        <tr>
                                            <td colspan="3"><img src="pics/trans.gif" height="1" /></td>
                                        </tr>
                                        <form action="doUpdateProfile" method="post">
                                            <tr>
                                                <td colspan="3" ><div align="left">
                                                        <h3 class="hline3"><strong>Basic Information </strong></h3>

                                                        <%
                                                            List<AccountDetailBeans> detail = list.selectDetailAccountByUsername(username);
                                                            String fullname = "";
                                                            String contact = "";
                                                            String Date_Of_Birth = "";
                                                            String Marital_Status = "";
                                                            String Mother_Tongue = "";
                                                            String Address = "";

                                                            int height = 0;
                                                            for (int dt = 0; dt < detail.size(); dt++) {
                                                                fullname = detail.get(dt).getFull_Name();
                                                                contact = detail.get(dt).getContact_Number();
                                                                Date_Of_Birth = detail.get(dt).getDateOfBirth();
                                                                Marital_Status = detail.get(dt).getMarital_Status();
                                                                Mother_Tongue = detail.get(dt).getMother_Tongue();
                                                                Address = detail.get(dt).getAddress();
                                                                height = detail.get(dt).getHeight();

                                                            }
                                                            String[] date = ConvertDateTime.getBirthDay(Date_Of_Birth);
                                                            int day = Integer.parseInt(date[2]);
                                                            int month = Integer.parseInt(date[1]);
                                                            int year = Integer.parseInt(date[0]);
                                                        %>
                                                    </div></td>
                                            </tr>
                                            <tr>
                                                <td colspan="3" ><img src="../../../www.numinousmatch.com/pics/blank(1).gif" height="1" /></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td >&nbsp;</td>
                                                <td colspan="2" align="right" >* All fields are mandatory </td>
                                            </tr>



                                            <tr class="hline2">
                                                <td ><div align="left">* Full Name</div></td>
                                                <td colspan="2" ><div align="left">
                                                        <input name="txtName" type="text"  value="<%=fullname%>" class="textbox1"  id="txtName" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                                    </div></td>
                                                <td><script type="text/javascript">
                                                    var f20 = new LiveValidation('txtName');
                                                    f20.add(Validate.Presence);
                                                    </script></td>
                                            </tr>

                                            <tr class="hline2">
                                                <td ><div align="left">* Height</div></td>
                                                <td colspan="2" ><div align="left">
                                                        <input name="txtHeight" type="text"  value="<%=height%>" class="textbox1"  id="txtName" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                                    </div></td>
                                            </tr>
                                            </tr>
                                            <tr class="hline2">
                                                <td ><div align="left">* Date of Birth</div> </td>
                                                <td ><div align="left">
                                                        <select  name="dobDay" class="forminput" style="width:57px;"  id="example3">

                                                            <% for (int d = 1; d < 32; d++) {
                                                                    if (d == day) {
                                                            %>
                                                            <option value="<%=day%>" selected="selected"><%=day%></option>
                                                            <%} else {
                                                            %>
                                                            <option value="<%=d%>"><%=d%></option>
                                                            <%}
                                                                }%>
                                                        </select>
                                                        <select name="dobMonth" class="forminput" style="width:82px;"   id="example2" >
                                                            <% for (int m = 1; m < 32; m++) {
                                                                    if (m == month) {
                                                            %>
                                                            <option value="<%=month%>" selected="selected"><%=month%></option>
                                                            <%} else {
                                                            %>
                                                            <option value="<%=m%>"><%=m%></option>
                                                            <%}
                                                                }%>
                                                        </select>

                                                        <script>
                                                            function calculate_age() {

                                                                // validate input
                                                                yy = document.getElementById('example4').value.substr(2,3);

                                                                mm = document.getElementById('example2').value;

                                                                dd = document.getElementById('example3').value;
                                                                yy = parseInt(yy,10);

                                                                mm = parseInt(mm,10);

                                                                dd = parseInt(dd,10);

                                                                if(isNaN(dd) || isNaN(mm) || isNaN(yy)) { return 0; }

                                                                if((dd < 1 || dd > 31) || (mm < 1 || mm > 12)) { return 0; }
                                                                // change human inputted month to javascript equivalent
                                                                mm = mm - 1;
                                                                // get today's date
                                                                var today = new Date();
                                                                var t_dd = today.getDate();
                                                                var t_mm = today.getMonth();
                                                                var t_yy = today.getFullYear();
                                                                // We are using last two digits, so make a guess of the century
                                                                if(yy == 0) { yy = "00"; }
                                                                else if(yy < 9) { yy = "0"+yy; }
                                                                yy = (today.getFullYear() < "20"+yy ? "19"+yy : "20"+yy);
                                                                // Work out the age!
                                                                var age = t_yy - yy - 1; // Starting point
                                                                if( mm < t_mm ) { age++;} // If it's past their birth month
                                                                if( mm == t_mm && dd <= t_dd) { age++; } // If it's past their birth day
                                                                document.getElementById('age').value=age;
                                                            }
                                                        </script>
                                                        <select name="dobYear" class="forminput" style="width:76px;" onChange="calculate_age();" id="example4"  >

                                                            <% for (int y = 1950; y < 1997; y++) {
                                                                    if (y == year) {
                                                            %>
                                                            <option value="<%=year%>" selected="selected"><%=year%></option>
                                                            <%
                                                            } else {
                                                            %>
                                                            <option value="<%=y%>"><%=y%></option>
                                                            <%}
                                                                }%>
                                                        </select>
                                                        &nbsp;&nbsp;or&nbsp; <input type="text" name="age" value="" id="age" size="3"  /> yrs

                                                    </div></td>
                                                <td ></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td   valign="center"><div align="left">* Marital Status</div></td>
                                                <td colspan="2" ><div align="left">
                                                        <script>
                                                            function do_hide(){
                                                                var x=document.getElementById("NOOFCHILDREN")
                                                                x.disabled=true;
                                                                document.getElementById('CHILDLIVINGWITHME').disabled = true;
                                                                document.getElementById('NOTLIVINGWITHME').disabled = true;
                                                            }
                                                            function do_hide2(){
                                                                var x=document.getElementById("NOOFCHILDREN")
                                                                x.disabled=false;
                                                            }
                                                            function do_hide3(val) {
                                                                if(val!=0) {
                                                                    document.getElementById('CHILDLIVINGWITHME').disabled = false;
                                                                    document.getElementById('NOTLIVINGWITHME').disabled = false;
                                                                } else{
                                                                    document.getElementById('CHILDLIVINGWITHME').disabled = true;
                                                                    document.getElementById('NOTLIVINGWITHME').disabled = true;
                                                                }
                                                            }
                                                        </script>
                                                        <input name="MARITAL_STATUS" onclick="do_hide()" value="Unmarried" type="radio"  />
                                                        Unmarried &nbsp;
                                                        <input name="MARITAL_STATUS" onclick="do_hide2()" value="Widower" type="radio"  />
                                                        Widow/Widower &nbsp;
                                                        <input name="MARITAL_STATUS" onclick="do_hide2()" value="Divorcee" type="radio"   />
                                                        Divorcee &nbsp;
                                                        <input name="MARITAL_STATUS" onclick="do_hide2()" value="Separated" type="radio"    />
                                                        Separated </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td   width="210"><div align="left"> &nbsp;&nbsp;No. of Children</div></td>
                                                <td colspan="2"   valign="top"><div align="left">
                                                        <select style="width:220px;"  class="forminput" name="NOOFCHILDREN" id="NOOFCHILDREN" onchange="do_hide3(this.value)">
                                                            <option selected="" value="">- Select -</option>
                                                            <% for (int c = 1; c < 5; c++) {
                                                            %>
                                                            <option value="<%=c%>"> <%=c%></option>
                                                            <%}%>
                                                        </select>
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td ><div align="left">&nbsp;&nbsp;Children Living Status</div></td>
                                                <td colspan="2" ><div align="left">
                                                        <input name="CHILDLIVINGWITHME"  id="CHILDLIVINGWITHME" value="Yes" type="radio" />
                                                        Living with me &nbsp;
                                                        <input name="CHILDLIVINGWITHME" id="NOTLIVINGWITHME" onfocus="" value="No" type="radio"   />
                                                        Not living with me </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td ><div align="left">* Religion</div></td>
                                                <script>
                                                    function caste_resetRF(val){
                                                        alertdo(val);
                                                        document.getElementById('Language').selectedIndex = 0;
                                                    }
                                                </script>
                                                <td colspan="2" ><div align="left">
                                                        <select onchange="caste_resetRF(this.value);" class="selectfield religion" style="width:220px;" size="1" id="religion" name="religion">

                                                            <%
                                                                String religionName = "";
                                                                int religionID = 0;
                                                                List<ReligionBeans> religion = list.getReligionByUsername(username);
                                                                for (int j = 0; j < religion.size(); j++) {
                                                                    religionName = religion.get(j).getReligion_Name();
                                                                    religionID = religion.get(j).getReligion_Id();
                                                                }
                                                                List<ReligionBeans> religionList = list.selectAllReligions();
                                                                for (int j = 0; j < religionList.size(); j++) {
                                                                    if (religionID == religionList.get(j).getReligion_Id()) {
                                                            %>
                                                            <option selected="" value="<%=religionID%>"><%=religionName%></option>
                                                            <% } else {

                                                            %>
                                                            <option value="<%=religionList.get(j).getReligion_Id()%>"><%=religionList.get(j).getReligion_Name()%></option>
                                                            <%}
                                                                }%>
                                                        </select>
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td ><div align="left">* Mother tongue</div></td>
                                                <script>
                                                    function do_request(val) {

                                                        religion = $('select.religion option:selected').val();
                                                        //religion1  = document.getElementById('religion').selectedIndex;
                                                        //alert(religion + ' - '+religion1);
                                                        //alert('generateCaste.php?lang='+val+'&rel='+religion);

                                                        document.getElementById('caste_rel').innerHTML = "<img src='loading.gif'>";

                                                        $.post('generateCaste415a.html?lang='+val+'&rel='+religion,'', function(data) {

                                                            document.getElementById('caste_rel').innerHTML = "<img src='loading.gif'>";

                                                            if(data!=''){
                                                                document.getElementById('caste_rel').innerHTML = data;
                                                            }});
                                                        //return true;
                                                    }
                                                </script>
                                                <td colspan="2" ><div align="left">
                                                        <select  class="selectfield" style="width:220px;" size="1" id="Language" name="Language">
                                                            <option selected="true" value="<%=Mother_Tongue%>"><%=Mother_Tongue%></option>
                                                            <option value="vietnamese">Vietnamese</option>
                                                            <option value="english">English</option>
                                                            <option value="indian">Indian</option>
                                                            <option value="korean">Korean</option>
                                                            <option value="japanese">Japanese</option>
                                                            <option value="french">French</option>
                                                            <option value="spanish">Spanish</option>
                                                            <option value="Tieng Viet">Tieng Viet</option>
                                                            <option value="Tieng Hi Lap">Tieng Hi Lap</option>
                                                            <option value="1">-other-</option>

                                                        </select>
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td  ><div align="left" id="caste">* Caste </div></td>
                                                <td colspan="2" ><div align="left" id="caste_rel">

                                                        <select name="caste" class="forminput" id="caste" style="width:220px;" >

                                                            <%
                                                                List<CasteBeans> caste = list.getCasteByUsername(username);
                                                                String casteName = "";
                                                                int casterID = 0;

                                                                for (int f = 0; f < caste.size(); f++) {
                                                                    casteName = caste.get(f).getCaste_Name();
                                                                    casterID = caste.get(f).getCaste_Id();
                                                                }
                                                                List<CasteBeans> casteList = list.selectAllCaste();
                                                                for (int k = 0; k < casteList.size(); k++) {
                                                                    if (casterID == casteList.get(k).getCaste_Id()) {

                                                            %>
                                                            <option value="<%=casterID%>" selected="true"><%=casteName%></option>
                                                            <%
                                                            } else {
                                                            %>
                                                            <option value="<%=casteList.get(k).getCaste_Id()%>"><%=casteList.get(k).getCaste_Name()%></option>
                                                            <%}
                                                                }%>
                                                        </select>
                                                    </div></td>
                                            </tr>

                                            <tr class="hline2">
                                                <td ><div align="left">&nbsp;&nbsp;* Address </div></td>
                                                <td colspan="2" ><div align="left">
                                                        <input name="txtSubcaste" id="txtAddress" size="40" maxlength="50" type="text" class="textbox1" style="width:217px;" value="<%=Address%>"/>
                                                    </div>
                                                    <div align="left"></div></td>
                                            </tr>

                                            <!----added by Arunkumar on 28-11-2011-->
                                            <tr class="hline2">
                                                <td><div align="left">&nbsp;&nbsp;Profession </div></td>
                                                <td colspan="2"><div align="left">
                                                        <span id="cn">
                                                            <select name="profession" class="forminput" id="profession" style="width:220px;">
                                                                <%
                                                                    List<ProfessionalBeans> profess = list.getProfessionalByUsername(username);
                                                                    String proName = "";
                                                                    int proID = 0;

                                                                    for (int f = 0; f < profess.size(); f++) {
                                                                        proName = profess.get(f).getProfessional_Name();
                                                                        proID = profess.get(f).getProfessional_Id();
                                                                    }
                                                                    List<ProfessionalBeans> lstprofess = list.selectAllProfessionals();

                                                                    for (int e = 0; e < lstprofess.size(); e++) {
                                                                        if (proID == lstprofess.get(e).getProfessional_Id()) {
                                                                %>
                                                                <option value="<%=proID%>" selected="true"><%=proName%></option>
                                                                <% } else {%>

                                                                <option value="<%=lstprofess.get(e).getProfessional_Id()%>"><%=lstprofess.get(e).getProfessional_Name()%></option>
                                                                <%}
                                                                    }%></select> </span>
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td><div align="left">&nbsp;&nbsp;City</div></td>
                                                <td colspan="2"><div align="left">
                                                        <select name="City" class="forminput" id="select_city" style="width:220px;" onChange="javascript:enb('city');" >
                                                            <%

                                                                List<CityBeans> city = list.getCityByUsername(username);
                                                                String cityName = "";
                                                                int cityID = 0;

                                                                for (int f = 0; f < city.size(); f++) {
                                                                    cityName = city.get(f).getCity_Name();
                                                                    cityID = city.get(f).getCity_Id();
                                                                }
                                                                int countryID = list.getCountryIDByUsername(username);
                                                                //                                                                 
                                                                List<CityBeans> lstcity = list.selectAllCitiesByCountry(countryID);

                                                                for (int h = 0; h < lstcity.size(); h++) {
                                                                    if (cityID == lstcity.get(h).getCity_Id()) {
                                                            %>
                                                            <option value="<%=cityID%>" selected="true"><%=cityName%></option>
                                                            <% } else {%>


                                                            <option value="<%=lstcity.get(h).getCity_Id()%>"><%=lstcity.get(h).getCity_Name()%></option>
                                                            <%}
                                                                }%>
                                                        </select>
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td><div align="left">*&nbsp;Mobile </div></td>
                                                <td colspan="2" ><div align="left">
                                                        <input name="txtMobile" type="text"  value="<%=contact%>" class="textbox1"  id="txtName" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2" style="display:none;">
                                                <td><div align="left">&nbsp;Other Country </div></td>
                                                <td colspan="2"><div align="left">
                                                        <input name="text3" type="text" id="country_text" disabled="true" style="position: static" style="width:219px;"/>
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2" style="display:none;">
                                                <td><div align="left">&nbsp;Other State</div></td>
                                                <td colspan="2"><div align="left">
                                                        <input name="text2" type="text" id="state_text" disabled="true" style="position: static" style="width:219px;" />
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2" style="display:none;">
                                                <td><div align="left">&nbsp;Other City </div></td>
                                                <td colspan="2"><div align="left">
                                                        <input name="text" type="text" id="city_text" disabled="true" style="position: static"  style="width:219px;"/>
                                                        <input type="hidden" name="ddlSelectCountry" id="ddlSelectCountry" />
                                                        <input type="hidden" name="ddlSelectState" id="ddlSelectState" />
                                                        <input type="hidden" name="ddlSelectCity" id="ddlSelectCity" />
                                                    </div></td>
                                            </tr>

                                            <!-- ends here --->

                                            <tr class="hline2">
                                                <td ><div align="left">&nbsp;&nbsp;Family Detail </div></td>
                                                <td colspan="2" ><div align="left">
                                                        <textarea rows="4" cols="35" name="txtFamilyDetail">At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
                                                        </textarea>   
                                                    </div></td>
                                            </tr>
                                            <tr class="hline2">
                                                <td ><div align="left">&nbsp;&nbsp;Profile Created by </div></td>
                                                <td colspan="2" ><div align="left">
                                                        <select name="txtPC" class="forminput" id="txtPC" style="width:220px;">
                                                            <option value="Self" >Self</option>
                                                            <option value="Parents"  >Parents</option>
                                                            <option value="Guardians"  >Guardians</option>
                                                            <option value="Friendss" >Friends</option>
                                                            <option value="sibling">Siblings</option>
                                                            <option value="relatives">Relatives</option>
                                                        </select>
                                                    </div></td>

                                            </tr>
                                            <tr class="hline2">
                                                <td ><div align="left">&nbsp;&nbsp;Reference by </div></td>
                                                <td colspan="2" ><div align="left">
                                                        <select name="txtRef" class="forminput" id="txtRef" style="width:220px;">
                                                            <option value="Advertisements" >Advertisements</option>
                                                            <option value="Friends"  >Friends</option>
                                                            <option value="Searh Engines"  >Searh Engines</option>
                                                            <option value="Others" >Others</option>
                                                        </select>
                                                    </div></td>
                                            </tr>
                                            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>

                                            <tr>
                                                <td colspan="4"   height="7"><div align="center">
                                                        <div align="center"><span class=" span"></span>
                                                            <input class="button-small square-orange uppercase float_right" style="float:none; clear:both; border:0px;" name="Submit" type="image" value="SAVE" alt="SAVE" onclick=""/>
                                                            <input class="button-small square-orange uppercase float_right" style="float:none; clear:both; border:0px;" name="Submit" type="image" value="CANCEL" alt="CANCEL" onclick=""/>

                                                        </div>
                                                    </div></td>
                                            </tr>



                                        </form> 

                                        <tr>
                                            <td colspan="3"><img src="pics/trans.gif" height="1" /></td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" ><div align="left">
                                                    <h3 class="hline3"><strong>Personal Interests </strong></h3>
                                                </div></td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" ><img src="../../../www.numinousmatch.com/pics/blank(1).gif" height="1" /></td>
                                        </tr>
                                        <form action="doUpdateLiking" name="liking">
                                            <tr class="hline2">
                                                <td >&nbsp;</td>
                                                <td colspan="2" align="right" >* All fields are mandatory </td>
                                            </tr>
                                            <%
                                        List<LikingCateBeans> cateList = new ArrayList<LikingCateBeans>();
                                        cateList = selects.selectAllLlikingCates();
                                        for (int i = 0; i < cateList.size(); i++) {
                                    %>


                                    <tr class="hline2">
                                        <td ><div align="left" style="width: 70px; color: #00ae31; font-size: 14px"><%= cateList.get(i).getLiking_Name()%> :</div></td>
                                        <td colspan="2" ><div align="left">
                                                <table>
                                                    <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td</tr>
                                                    <tr><td>
                                                            <% 
                                                            List<LikingModelBeans> modelList = new ArrayList<LikingModelBeans>();
                                                                 modelList=  selects.selectAllLlikingModelById(cateList.get(i).getLiking_Id());
                                                                for (int j = 0; j < modelList.size(); j++) {
                                                            %>
                                                            <div style="width:160px; float: left" >   
                                                                <input name="selectBox" type="checkbox"  value="<%=modelList.get(j).getLiking__Model_Id()%>" />&nbsp;&nbsp;&nbsp;&nbsp;<%=modelList.get(j).getLiking_Model_Name()%>
                                                            </div>
                                                            <%}%></td>
                                                    </tr>
                                                    <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td</tr>
                                                </table>                          
                                            </div></td>
                                    </tr>
                                    <%}%>
                                            </tr>
                                            <tr>
                                                <td   valign="center">&nbsp;</td>
                                                <td width="500" colspan="2"   valign="top">&nbsp;</td>

                                            </tr>

                                            </table> 
                                            <tr>
                                                <td   valign="center">&nbsp;</td>
                                                <td width="500" colspan="2"   valign="top">&nbsp;</td>

                                            </tr>
                                            <tr>
                                                <td colspan="4"   height="7"><div align="center">
                                                        <div align="center"><span class=" span"></span>
                                                            <input class="button-small square-orange uppercase float_right" style="float:none; clear:both; border:0px;" name="Submit" type="image" value="SAVE" alt="SAVE" onclick=""/>
                                                            <input class="button-small square-orange uppercase float_right" style="float:none; clear:both; border:0px;" name="Submit" type="image" value="CANCEL" alt="CANCEL" onclick=""/>

                                                        </div>
                                                    </div></td>
                                            </tr>
                                        </form>
                                        </div>
                                        <div class="footer"> <a href="#top" class="btn_goTop" style="margin-left:10px;">Go Top</a> </div>
                                        </div>
                                        <br />
                                        <!-- BUSINESS PAGE CONTENT ends HERE ############################################ -->
                                        </div>
                                        </div>
                                        <!-- CONTENT AREA ENDS HERE ###################################################  -->
                                        <jsp:include page="footer.jsp"></jsp:include>
                                        </div>
                                        </body>
                                        <script>
                                            function do_check(text1) {

                                                $.post('emailcheck308d.html?email='+text1,'', function(data) {

                                                    if(data!=''){
                                                        return data;
                                                    }});
                                            }
                                            function showToolTip(e,text,flag){
                                                if(document.all)e = event;
                                                var obj = document.getElementById('bubble_tooltip');
                                                var obj2 = document.getElementById('bubble_tooltip_content');
                                                if(obj==1)
                                                {
                                                    stop();
                                                }
                                                if(flag == 0) {
                                                    $.post('emailcheck308d.html?email='+text,'', function(data) {
                                                        if(data!=''){
                                                            obj2.innerHTML = data;
                                                        }});
                                                } else if(flag == 1){

                                                    $.post('passwordcheck.html','', function(data) {
                                                        if(data!=''){
                                                            obj2.innerHTML = '<font color="#A50050">'+data+'</font>';
                                                        }});
                                                } else {
                                                    obj2.innerHTML = '<font color="#A50050">Date of birth is for calculation of age only and will not display to other members</font>';
                                                }
                                                obj.style.display = 'block';

                                                var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);

                                                if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;

                                                var leftPos = e.clientX - 100;

                                                if(leftPos<0)leftPos = 0;

                                                obj.style.left = leftPos + 'px';

                                                obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';

                                            }
                                            function hideToolTip()

                                            {

                                                document.getElementById('bubble_tooltip').style.display = 'none';



                                            }
                                        </script>
                                        <script>
                                            function alertdo(flag)  {

                                                if(flag == 1) {

                                                    document.getElementById("caste").innerHTML = '* Caste/Division ';

                                                } else if(flag == 2  || flag == 3 || flag == 4) {

                                                    document.getElementById("caste").innerHTML = '* Sect/Division';

                                                } else if(flag == 5 || flag == 6  || flag == 7 || flag == 8) {

                                                    document.getElementById("caste").innerHTML = '* Denomination/Division';

                                                } else {

                                                    document.getElementById("caste").innerHTML = '* Caste/Division ';

                                                }





                                            }
                                            function showToolTip1(e,text){

                                                if(document.all)e = event;



                                                var obj = document.getElementById('bubble_tooltip1');

                                                var obj2 = document.getElementById('bubble_tooltip_content1');

                                                //obj2.innerHTML = text;

                                                obj2.innerHTML = '<font color="#A50050">'+text+'</font>';

                                                obj.style.display = 'block';

                                                var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);

                                                if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;

                                                var leftPos = e.clientX - 100;

                                                if(leftPos<0)leftPos = 0;

                                                obj.style.left = leftPos + 'px';

                                                obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';

                                            }
                                            function hideToolTip1()
                                            {
                                                document.getElementById('bubble_tooltip1').style.display = 'none';
                                            }

                                        </script>
                                        <script type="text/javascript" src="../../../www.lullabot.com/files/bt/bt-latest/other_libs/bgiframe_2.1.1/jquery.bgiframe.min.js"></script>
                                        <script type="text/javascript" src="../../../www.lullabot.com/files/bt/bt-latest/jquery.bt.min.js"></script>
                                        <script type="text/javascript"> jq = jQuery.noConflict();</script>
                                        <script type="text/javascript">jq('#example2').bt('<font color="A50050">Date of birth is for calculation of age only and will not display to other members</font>', {trigger: 'click', positions: 'top',fill: '#FFFAF4'}); </script>
                                        <script type="text/javascript">jq('#example3').bt('<font color="A50050">Date of birth is for calculation of age only and will not display to other members</font>', {trigger: 'click', positions: 'top',fill: '#FFFAF4'}); </script>
                                        <script type="text/javascript">jq('#example4').bt('<font color="A50050">Date of birth is for calculation of age only and will not display to other members</font>', {trigger: 'click', positions: 'top',fill: '#FFFAF4'}); </script>
                                        </html>
